package week_home_work02;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/22
 */
public class Demo12 {
    public static void main(String[] args) {
        //打印一个矩形，矩形的边长由用户输入。
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入矩形的长:");
        int a = sc.nextInt();
        System.out.println("请输入矩形的宽:");
        int b = sc.nextInt();
        for (int i = 1; i <= b; i++) {  //打印行(宽)
            for (int j = 1; j <= a; j++) {//打印列(长)
                System.out.print("*");
            }
            System.out.println();
        }

    }
}
